package com.kang.service.userService;

import com.kang.commons.Result;
import com.kang.dto.UsersDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.*;

@FeignClient("user-service") //调用的服务名称  spring。application。name的值
@RequestMapping("/user")
@Service
public interface UsersService {

    @PostMapping
    Result getUsers2(String token);

    @PostMapping("public/login")
    Result login(@RequestBody UsersDto usersDto);


    @PostMapping("/update")
    Result updateUser(UsersDto usersDto);

    @GetMapping("/{id}")
    Result getUsersById(@PathVariable Long id);
}
